package com.i77studio.springbootdemo;

import com.i77studio.entity.User;
import com.i77studio.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * {@code: @Author:} Guo XiongHui
 * {@code: @Date:} 2024/12/27 14:07
 **/

public class UserMapperImpl implements UserMapper {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }

    @Override
    public int deleteById(Integer id) {
        return userMapper.deleteById(id);
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    @Override
    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public User selectById(Integer id) {
        return userMapper.selectById(id);
    }

    public List<User> selectByUserName(String username) {
        return userMapper.selectByUserName(username);
    }

    @Override
    public int updateByIdSelective(User record) {
        return userMapper.updateByIdSelective(record);
    }

    @Override
    public int updateById(User record) {
        return userMapper.updateById(record);
    }

    @Override
    public int getCurrentMaxId() {
        return userMapper.getCurrentMaxId();
    }
}
